package com.stefanie.study.ap;

import lombok.extern.slf4j.Slf4j;

/**
 * @author: stefanie-zy
 * @time: 2024/7/4-13:44
 * @description: 适配器模式-适配器类<p>
 * 定义和实现目标接口的方法<p>
 * 继承原来的接口
 */
@Slf4j
public class AdapterB implements Target {

    private Adaptee adaptee;

    AdapterB(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void request() {
        log.info("需要适配之前的方法");
        adaptee.specificRequest();
    }
}
